// 命名空间

const state = {
  obj: { name: 'Tom' }
}
const mutations = {
  GET_OBJ(state, params) {
    state.obj.name = params
  }
}
const actions = {
  getObj({ commit }, params) {
    commit('GET_OBJ', params)
  }
}
const getters = {
  newObj(state) {
    return (state.obj.name = '32')
  }
}

export default {
  namespaced: true, // 开启命名空间
  state,
  mutations,
  actions,
  getters
}
